//
//  HelpViewController.m
//  DeepBreathing
//
//  Created by rimi on 15/12/16.
//  Copyright © 2015年 rimi. All rights reserved.
//

#import "HelpViewController.h"


@interface HelpViewController ()

@property(nonatomic,strong)UIImageView *HelpImage;

@end

@implementation HelpViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    _HelpImage = [[UIImageView alloc]initWithFrame:CGRectMake(CGRectGetMidX(self.view.frame)- 120, CGRectGetMidY(self.view.frame) - 165, 240, 330)];
    
    _HelpImage.image  = [UIImage imageNamed:@"帮助"];
    
    [self.view addSubview:_HelpImage];
    
    
    UILabel *title = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMidX(self.view.frame)- 50, 30, 100, 40)];
    
    title.text = @"帮 助";
    
    title.font = [UIFont fontWithName:@"Helvetica-Bold" size:22];
    
    title.textAlignment = NSTextAlignmentCenter;
    
    title.tintColor = [UIColor blackColor];
    
    [self.view addSubview:title];
    
    
    UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom];
    
    backButton.frame = CGRectMake(10, 10, 100, 100);
    
    [backButton setImage:[UIImage imageNamed:@"返回"] forState:UIControlStateNormal];
    
    [backButton addTarget:self action:@selector(goBack:) forControlEvents:UIControlEventTouchUpInside];
    
    [self.view addSubview:backButton];
    //block
    //返回值（^block名）（参数）= ^返回值（参数）{实现}
//    void (^b)(int a);
//    b = ^void(int a){
//        NSLog(@"%d",a);
//    };
//    b(1);
//    
//    void(^c)(int a) = b;
//    
//    [self methodWithBlock:b];
    
    
    
}
-(void)goBack:(UIButton *)sender{
    
    
    
    [self.navigationController popViewControllerAnimated:YES];
    
}

//-(void)methodWithBlock:(void(^)(int))block{
//    
//    block(3);
//    
//}



@end
